package com.seteam.collabcrossword.messages.server;

import com.seteam.collabcrossword.Globals;
import com.seteam.collabcrossword.messages.Message;

import java.io.Serializable;

/**
 * This message is used by the server to notify the client that the connection
 * has been established
 */
public class Connected implements Message, Serializable {
    private static final long serialVersionUID = 2939604379561351161L;
    private int sharedId;

    /**
     * Constructor
     *
     * @param shareId an integer used by the server to pair two clients
     */
    public Connected(final int shareId){
    	this.sharedId = shareId;
    }

    /**
     * Getter for sharedId
     * @return the shared ID
     */
    public int getShareId(){
    	return sharedId;
    }

    /**
     * {@inheritDoc}
     */
    public String getAction() {
        return Globals.CONNECTED;
    }
}
